﻿using System;

class MinAndMaxOfNNumbers
{
    static void Main()
    {
        Console.WriteLine("Enter how many numbers you want to compare:");
        int Number = int.Parse(Console.ReadLine());
        int MaxNumber = Number;
        int MinNumber = Number;
        for (int i = 1; i <= Number; i++)
        {
            Console.WriteLine("Enter a number:");
            int Number1 = int.Parse(Console.ReadLine());
            if (Number1 > MaxNumber)
            {
                MaxNumber = Number1;
            }
            if (Number1 < MinNumber)
            {
                MinNumber = Number1;
            }
        }
        Console.WriteLine("The greatest number is {0}", MaxNumber);
        Console.WriteLine("The lowest number is {0}", MinNumber);
    }
}

